Use SSH reverse tunnel to bypass VPN [on hold]

Posted by John J. Camilleri on Server Fault See other posts from Server Fault or by John J. Camilleri
Published on 2013-10-20T12:34:55Z Indexed on 2013/10/20 15:56 UTC
Read the original article Hit count: 160

Filed under:
|

I have shell access to a server M, but I need to log into a VPN on my machine L in order to access it. I want to be able to get around this VPN, and I've heard I can do this by creating a reverse SSH tunnel and using a intermediate server E (which I can access without the VPN). This is what I am trying:

  1. Turn on VPN on L, open SSH session to M
  2. On M, execute the command: ssh -f -N -T -R 22222:localhost:22 user@E
  3. From L, try to open SSH session to E on port 22222, hoping to end up at M

Step 2 seems to work without any complaint, but on step 3 I keep getting "connection refused". I have made sure that port 22222 is open on E:

7    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:22222 

I'm pretty new to SSH tunnelling and not sure what the problem could be. Any ideas what I can try?

© Server Fault or respective owner

Related posts about vpn

Related posts about ssh-tunnel